package com.grade.mapper;

import com.grade.Beans.Teacher;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
import java.util.Objects;

public interface TeacherMapper {

    List<Teacher>  findAll();
    public Teacher findById(int id);
    public int insert(Teacher teacher);
    public int update(Teacher teacher);
    public int delete(int id);
    public int updatepassword(@Param("tname") String tname,@Param("tpass")String password);
    /**
     * 模糊查询1*/
    List<Teacher> findByTeacherName(String teacherName);
    /**
     * 模糊查询2*/
    List<Teacher> findByTeacherNameLike(@Param("name") String teacherName);
    /**
     * 使用Map集合为参数*/
    List <Teacher> findByAge( Map<String, Object> map);

    Teacher login(@Param("tname") String tname, @Param("tpass") String tpass);
}